<div class="piece960">
	<div class="piece_hd1"></div>
	<div class="piece_bd1">	
		<table class="resource-table">
			<thead>
				<tr class="col-name">
					<th></th>
					<th class="baobei">宝贝</th>
					<th class="price">价格</th>
					<th class="reference_year">参考年份</th>
					<th class="alcoholic">酒精度</th>
					<th class="capacity">容量</th>
					<th class="vender">供应商</th>
					<th class="operate">发布操作</th>
					<th class="other">其它操作</th>
				</tr>
				<tr class="sep-row">
					<td colspan="9"></td>
				</tr>
				<tr class="toolbar">
					<td colspan="7">
						<label>
							<input type="checkbox" id="check_all_products">全选
							<a id="delete_checked_products" class="toolbtn" href="##">删除</a>
							<%= link_to '添加宝贝', new_product_path, :class => 'toolbtn'%>
						</label>
					</td>
					<td colspan="2">
						<div class="paginator-top">
							<div class="paginator-previous-grey g-u">
								<span class="paginator-arrow paginator-arrow-left-grey"></span>
							</div>
							<a class="paginator-next g-u">下一页<span class="paginator-arrow paginator-arrow-right-orange"></span></a>
						</div>
					</td>
				</tr>
			</thead>
			<% @products.each do |product| %>
			<tbody>
				<tr class="sep-row">
					<td colspan="9"></td>
				</tr>
				<tr class="order-hd">
					<td colspan="9">
						<span class="no">
							<label>
								<input type='checkbox' name='product_check_box' value='<%= product.id %>'>	
								宝贝编号:
								<span class="baobei-num"><%= product.id %></span>
							</label>
						</span>
						<span class="create-time">
							创建时间：<%= product.created_at %>
						</span>
						<span class="vender">

						</span>
					</td>
				</tr>
				<tr class="order-bd">
					<td class="baobei" colspan="2">
						<a href="/products/<%= product.id %>" target="_blank" title="查看宝贝详情"><div class="image_box thumb fl"><%= image_tag("grey.gif","data-original" => product.images.master.upload.thumb.url,:class => "lazy thumb") if product.images.master != nil && product.images.master.upload? %></div></a>	
						<div class="desc" style="padding: 10px 0;">
							<%= link_to "#{product.title}", product, :class => "baobei-name", :id => "product_name_#{product.id}" %>	
							<div class="spec">
								<span>种类：<%=product.sub_category %>&nbsp;&nbsp;<%=product.category %></span><br>
								<span>产地：<%=product.orign_country %>&nbsp;&nbsp;<%=product.orign_area %></span>
							</div>
						</div>
					</td>
					<td class="price text-center">
						<%= product.price %>
					</td>
					<td class="reference_year text-center">
						<%= product.reference_year %>
					</td>
					<td class="alcoholic text-center">
						<%= product.alcoholic %><span>%</span>
					</td>
					<td class="capacity text-center">
						<%= product.capacity %><span>ml</span>
					</td>
					<td class="vender text-center">
						<%= product.vender %>
					</td>
					<td class="operate text-center">
						<!--<a class="quota_dialog_button" name=<%= product.id %>>配额</a>-->
						<%= link_to '图片', product_images_path(product) %>
						<%= link_to "橱位", "/products/" + product.id.to_s + "/pinup", :class => "pinup", :pid => product.id.to_s %>
					</td>
					<td class="other text-center">
						<%= link_to '编辑', edit_product_url(product) %>
						<a href="##" name=<%= product.id %> class="delete_product_link">删除</a>
					</td>
				</tr>
			</tbody>	
			<% end %>
			<tfoot>
				<tr class="sep-row">
					<td colspan="9"></td>
				</tr>
				<tr class="toolbar skin-gray">
					<td colspan="9">
						<%= link_to '添加宝贝', new_product_path, :class => 'toolbtn'%>
					</td>
				</tr>
			</tfoot>
		</table>
	</div>
	<div class="piece_ft1"></div>
</div>
<!-- delete multiple products form -->
<%= form_tag("/products/delete", :method => "post", :id => "delete_checked_products_form" ) do %>
	<%= hidden_field_tag(:ids) %>
<% end %>
<!-- delete single product form -->
<%= form_tag("/products/", :method => "delete",:id => "delete_product_form") do %>
<% end %>

<div id="product_pinup_dialog" title="橱位设置" style="display: none;">
	<%= render "pinup/form" %>
</div>

<div id="product_pinup_edit_dialog" title="编辑一级橱位" style="display: none;">
  <div id="pinup_product_name"></div>
  <%= render "pinup/form_destroy.html" %>
</div>

<%= javascript_include_tag "application" %>

